package com.jackiechan.day13;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class Test_ArrayList {
    public static void main(String[] args) {
        ArrayList<Integer> list = new ArrayList();
        for (int i = 0; i < 10; i++) {
            list.add(i * 10);
        }
        display(list);
    }

    private static void display(List list) {
        System.out.println(list.size());
        System.out.println(Arrays.toString(list.toArray()));
        System.out.println(list.get(3));
        Object[] o = list.toArray();
        System.out.println(o.getClass());
        for (int i=0;i<o.length;i++){
            System.out.println(o[i]);
        }

    }

}
